package com.rfid.base.util;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextView;

import com.rfid.base.R;


public class AnimatorHelper {

	public static void anin(TextView text,int value){
		Animator an = ObjectAnimator.ofInt(new TextViewProxy(text), "x", 0,value);
		an.setDuration(1000);
		an.setInterpolator(new AccelerateDecelerateInterpolator());
		an.start();
	}
	
	public static void shake(Context context,View view){
		Animation an = AnimationUtils.loadAnimation(context, R.anim.shake);
		view.startAnimation(an);
	}
	
}
